/*
 *    This program is free software; you can redistribute it and/or modify
 *    it under the terms of the GNU General Public License as published by
 *    the Free Software Foundation; either version 2 of the License, or
 *    (at your option) any later version.
 *
 *    This program is distributed in the hope that it will be useful,
 *    but WITHOUT ANY WARRANTY; without even the implied warranty of
 *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *    GNU General Public License for more details.
 *
 *    2013 year
 *    Author: Esipenko Aleksey (Alexorleon)
 *    E-Mail: alexorleon@gmail.com
 */
#ifndef PROXYMODEL_H
#define PROXYMODEL_H

#include <QSortFilterProxyModel>

class ProxyModel : public QSortFilterProxyModel
{
    Q_OBJECT

public:
    explicit ProxyModel(QObject *parent=0);

    //int minimumZipcode() const { return m_minimumZipcode; }
    //int maximumZipcode() const { return m_maximumZipcode; }
    QString performer() const { return m_performer; }
    QString status() const { return m_status; }
    //QString placement() const { return m_placement; }
    QString date() const { return m_date; }
    //int id() const { return m_id; }

public slots:
    void clearFilters();
    //void setMinimumZipcode(int minimumZipcode);
    //void setMaximumZipcode(int maximumZipcode);
    void setPerformer(const QString &performer);
    void setStatus(const QString &status);
    //void setPlacement(const QString &placement);
    void setDate(const QString &date);
    //void setID(const int &id);

protected:
    bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const;

private:
    //int m_minimumZipcode;
    //int m_maximumZipcode;
    QString m_performer;
    QString m_status;
    //QString m_placement;
    QString m_date;
    //int m_id;
};

#endif // PROXYMODEL_H
